home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
wsc4vb24
/
module16.bas
< prev
next >
Wrap
BASIC Source File
|
1998-08-08
|
682b
|
37 lines
'
' VBA (EXCEL/ACCESS/WORD) Module Code
'
Const Port = COM1
Function OpenPort ()
Dim Code As Integer
Code = SioReset(Port, 512, 512)
Code = SioBaud(Port, Baud9600)
Code = SioParms(Port, NoParity, OneStopBit, WordLength8)
Code = SioDTR(Port, SET_LINE)
OpenPort = Code
End Function
Function ClosePort()
ClosePort = SioDone(Port)
End Function
Function GetByte()
GetByte = SioGetc(Port)
End Function
Function PutAT()
Dim Code As Integer
Code = SioPutc(Port, Asc("A"))
Code = SioPutc(Port, Asc("T"))
PutAT = SioPutc(Port, 13)
End Function
Function PutByte (TheByte)
Dim Code As Integer
Code = SioPutc(Port, TheByte)
PutByte = Code
End Function